//
//  VerticalButton.m
//  项目A_百思不得姐
//
//  Created by wudongyang on 16/5/27.
//  Copyright © 2016年 wudongyang. All rights reserved.
//

#import "VerticalButton.h"
#import "UIView+DSSealFrame.h"
@implementation VerticalButton

// 重写按钮里的文字label居中对齐
-(void)awakeFromNib{
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    // 调整图片
    self.imageView.x = 0;
    self.imageView.y = 0;
    self.imageView.width = self.width;
    self.imageView.height = self.imageView.width;
    // 调整文字
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.height;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.titleLabel.y;
}

@end
